import java.util.Scanner;

public class Program8 {
    public static void main(String[] args) {
        Scanner console = new Scanner(System.in);
        int number,round,sum = 0,temp;
        System.out.print("请输入一个数字：");
        number = console.nextInt();
        temp = number;
        System.out.print("请输入相加的个数：");
        round = console.nextInt();
        for (int i = 0;i < round;i++){
            sum += temp;
            temp = temp*10+number;
        }
        System.out.println(sum);
    }
}